package com.viewpagertext.activitys;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import androidx.viewpager.widget.ViewPager;

import com.google.android.material.tabs.TabLayout;
import com.viewpagertext.R;
import com.viewpagertext.adapters.LocalMusicAdapter;
import com.viewpagertext.views.MyRoundedImageView;

public class LocalMusicActivity extends AppCompatActivity {

    private ViewPager viewPager;
    private TabLayout tabLayout;
    private MyRoundedImageView myRoundedImageView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_local_music);

        viewPager = findViewById(R.id.local_music_viewpager);
        tabLayout = findViewById(R.id.local_music_tablayout);
        myRoundedImageView = findViewById(R.id.local_back_icon);

        viewPager.setAdapter(new LocalMusicAdapter(getSupportFragmentManager()));
        tabLayout.setupWithViewPager(viewPager);
        myRoundedImageView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }

}